<template>
  <BasicDrawer v-bind="$attrs" @register="registerDrawer" destroyOnClose title="券码列表" :width="1400" :showFooter="false">
    <CompanyUserGoodsIndex ref="companyUserGoodsIndex"></CompanyUserGoodsIndex>
  </BasicDrawer>
</template>
<script lang="ts" setup>
import { getCurrentInstance } from 'vue';
import { BasicDrawer, useDrawerInner } from '@apps/antd-admin/src/components/drawer';
import CompanyUserGoodsIndex from './CompanyUserGoodsIndex.vue';

const ctx: any = getCurrentInstance();

const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async data => {
  let record = data.record;
  console.info(record.orderdetailId);
  ctx.refs['companyUserGoodsIndex'].setSearchInfoProps(record.orderdetailId);
});
</script>
